package com.bdqn.text;

import java.util.Scanner;

public class text {
    public static void main(String[] args) {
     String no,brand,mtype,type;
     int seatCount,days,rent;
     Car car;
     Bus bus;
        Scanner input=new Scanner(System.in);
        System.out.println("欢迎来到汽车租聘公司!");
        System.out.println("输入要租聘的天数:");
        days=input.nextInt();
        System.out.println("请输入要租聘的类型:(1:轿车    2:客车):");
        mtype=input.next();
        if("1".equals(mtype)){
            System.out.println("请输入租聘的品牌:(1.别克  2.宝马):");
            brand=input.next();
            if("1".equals(brand))
                System.out.println("1.商务舱Gla   2.林荫大道):");
            else
                System.out.println("1.550i");
            type=input.next();
            no="京JE9277";
            System.out.println("分配给您的汽车牌号是:"+no);
            car=new Car(no,brand,type);
            rent=car.calRent(days);
        }else{
            System.out.println("请输入租聘的客车品牌(1.金杯   2.金龙):");
            brand=input.next();
            System.out.println("输入客车的座位数;");
            seatCount=input.nextInt();
            no="京Q6P7K6";
            System.out.println("分配给您的汽车牌号是:"+no);
            bus=new Bus(no,brand,seatCount);
            rent=bus.calRent(days);
        }
        System.out.println("\n顾客您好!您需要支付的租聘费用为:"+rent+".");

    }
}
